package com.macro.mall.portal.service;

import com.macro.mall.domain.MessageEnum;
import com.macro.mall.domain.MessageManagementAssemble;
import com.macro.mall.domain.MySession;
import com.macro.mall.model.UmsMember;

import java.util.List;

/**
 * 消息管理Service
 */
public interface MmsMessageService {

    /**
     * 记录留言信息
     * @param fromId
     * @param toId
     * @param msg
     * @param msgReadStatusNo : 是否已读
     * @return
     */
    int recordLeaveWord(Long fromId, Long toId, String msg, MessageEnum msgReadStatusNo);

    /**
     * 获取未阅读的消息数量
     * @param username
     * @return
     */
    long getUnreadeMsgCount(String username);

    /**
     * 获取更多历史记录
     * @param selfMember
     * @param sfMember
     * @param currentPageIndex
     * @return
     */
    List<MessageManagementAssemble> getMoreMsgOfHistory(UmsMember selfMember, UmsMember sfMember, Integer currentPageIndex);

    /**
     * 近期会话列表
     * @param username
     * @return
     */
    List<MySession> getSessionList(String username);

    /**
     * 获取未读消息列表
     * @param selfId
     * @param oppositeId
     * @return
     */
    List<MessageManagementAssemble> getUnreadMstList(long selfId, long oppositeId);
}
